<?php
class version extends Model{
	private $table="xdf_version";
	private $fileds=array("id","version","desc","url","type","release_time","create_time");
	public function getTypeByVersion($version){
		$sql="SELECT `type` FROM $this->table WHERE `version`=$version;";
		return $this->fetchRow($sql);
	}
	public function getLastVersionByType($type){
		$sql="SELECT * FROM $this->table WHERE `type`=$type ORDER BY `release_time` DESC;";
		return $this->fetchRow($sql);
	}
}